//
//  ByCellServiceGoodDetailNote.m
//  mijifen_ios
//
//  Created by 朱凯 on 2017/11/13.
//  Copyright © 2017年 itboye. All rights reserved.
//

#import "ByCellServiceGoodDetailNote.h"

@implementation ByCellServiceGoodDetailNote
{
    UILabel         *_noteLabel;        //
    UIImageView     *_imageView;        //
}

- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier {
    
    if (self = [super initWithStyle:style reuseIdentifier:reuseIdentifier]) {
        
        self.backgroundColor = BY_BG_COLOR;
        self.selectionStyle = UITableViewCellSelectionStyleNone;
        [self setupUI];
    }
    return self;
}

- (void)setupUI {
    
    _imageView = [UIImageView new];
    _imageView.backgroundColor = BY_RED_COLOR;
    [self.contentView addSubview:_imageView];
    
    _noteLabel = [[UILabel alloc] init];
    _noteLabel.text = @"不要宅了，多出行吧，购买立减20元（出行补贴）";
    _noteLabel.font = FONT(14);
    _noteLabel.textAlignment = NSTextAlignmentLeft;
    _noteLabel.textColor = [UIColor lightGrayColor];
    [self.contentView addSubview:_noteLabel];
    
    
    // 布局
    [_imageView mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.equalTo(@10);
        make.size.mas_equalTo(CGSizeMake(15, 15));
        make.centerY.equalTo(@0);
    }];
    [_noteLabel mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.equalTo(_imageView.mas_right).offset(5);
        make.centerY.equalTo(_imageView);
        make.right.equalTo(@-10);
    }];
}


@end
